package io.geekidea.springbootplus.system.service;

import io.geekidea.springbootplus.system.entity.School;
import io.geekidea.springbootplus.system.param.SchoolPageParam;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.system.vo.SchoolQueryVo;
import io.geekidea.springbootplus.framework.core.pagination.Paging;

import java.util.List;
import java.io.Serializable;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

/**
 *  服务类
 *
 * @author miko
 * @since 2020-10-23
 */
public interface SchoolService extends BaseService<School> {

    /**
     * 保存
     *
     * @param school
     * @return
     * @throws Exception
     */
    boolean saveSchool(School school) throws Exception;

    /**
     * 修改
     *
     * @param school
     * @return
     * @throws Exception
     */
    boolean updateSchool(School school) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteSchool(Long id) throws Exception;

    /**
     * 根据ID获取查询对象
     *
     * @param id
     * @return
     * @throws Exception
     */
    SchoolQueryVo getSchoolById(Serializable id) throws Exception;


    List<School> getAllList(LambdaQueryWrapper<School> wrapper) throws Exception;

    /**
     * 获取分页对象
     *
     * @param schoolQueryParam
     * @return
     * @throws Exception
     */
    Paging<SchoolQueryVo> getSchoolPageList(SchoolPageParam schoolPageParam) throws Exception;


}
